import java.util.Scanner;

public class EighthQuestion {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        int number = (int)(Math.random()*100);
        System.out.println(number);
       System.out.println("猜数字");

        int counter=0;
        while (true){
            counter++;
            System.out.println("请输入你猜的数字：");
            int num=input.nextInt();
            if (number==num){
                System.out.println("猜对了");
                if (counter==1){
                    System.out.println("你太有才了，一次就中");
                }else if (counter>=2&&counter<= 6){
                    System.out.println("这么快就猜出来了。很聪明");
                }else if (counter>=7){
                    System.out.println("猜的有点慢，要继续努力");
                }
                break;
            }
            if (num/2>number||num>number){
                System.out.println("太大了");
            }
            if (num*2< number||num<number ){
                System.out.println("太小了");
            }

        }
    }
}
